/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.opgea.token.util;

import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

import com.opgea.token.domain.entities.Company;
import com.opgea.token.domain.entities.CurrentToken;
import com.opgea.token.domain.entities.Destination;
import com.opgea.token.domain.entities.Employee;
import com.opgea.token.domain.entities.Login;
import com.opgea.token.domain.entities.Token;
import com.opgea.token.domain.entities.TokenDetails;

/**
 * 
 * @author Ramesh
 */
@SuppressWarnings("deprecation")
public class TestCreate {

    public static void main(String args[]) {
	AnnotationConfiguration config = new AnnotationConfiguration();
	config.addAnnotatedClass(Company.class);
	config.addAnnotatedClass(Token.class);
	config.addAnnotatedClass(TokenDetails.class);
	config.addAnnotatedClass(CurrentToken.class);
	config.addAnnotatedClass(Employee.class);
	config.addAnnotatedClass(Login.class);
	config.addAnnotatedClass(Destination.class);
	config.configure("hibernate.cfg.xml");
	new SchemaExport(config).create(true, true);
    }
}
